Skip to content

Add atomic Resource proposal publication - #409

Merged
schickling-assistant merged 2 commits into
schickling-assistant/2026-08-31-resource-observe-nowfrom
schickling-assistant/2026-09-01-wasip2-resource-foundation-2
Sep 1, 2026
Merged

Add atomic Resource proposal publication#409
schickling-assistant merged 2 commits into
schickling-assistant/2026-08-31-resource-observe-nowfrom
schickling-assistant/2026-09-01-wasip2-resource-foundation-2

Conversation

@schickling-assistant

@schickling-assistant schickling-assistant commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Problem

Observable Resource providers need to publish a carrier and its delivery intent as one fenced operation. Separate writes can lose invalidation, replay stale work, or wedge after a crash.

Goal

Provide a reusable proposal commit primitive with generation, revision, and prior-digest compare-and-swap semantics.

Decisions

  • The host owns proposal validation and one atomic carrier plus deterministic outbox commit.
  • Proposal identity is domain separated and stable across lost acknowledgements.
  • Carrier divergence requires an explicit generation advance instead of silent repair.
  • The Resource Profile requirements and decision 0009 now record this publication boundary. Johannes approved that constitutional amendment in Q39.

Verification

  • CI=1 nix develop -c cargo test -p st2-resource-protocol
  • CI=1 nix develop -c cargo test --lib resource_profile
  • CI=1 nix develop -c cargo test --test invariants
  • axe vrs check --profile strict docs/vrs/07-resource-profile

All commands passed locally. Tests cover crash recovery, lost acknowledgements, multiprocess contention, stale fences, divergence recovery, and legacy intent migration.

Complexity

The persistent lock and intent record are necessary to make carrier publication and notification one recoverable transaction across process crashes.

Concerns

This PR changes the durable proposal intent schema. The implementation includes explicit migration coverage for predecessor intents.

Friction & bottlenecks

The repository has no devenv task graph, so validation uses its Cargo and Nix gates directly.

Follow-ups

The next PR in stack #412 adds the universal WASIp2 executor that consumes this primitive.

References

Posted on behalf of @schickling
field value
agent_identity dev3.direct.omp.2cshu64q
session dev3.2cshu64q
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.0.9
agent_runtime OMP 18.0.9
tooling_profile dotfiles@b607597

@schickling-assistant schickling-assistant changed the title feat(resource): add atomic proposal publication core Add atomic Resource proposal publication Sep 1, 2026
@schickling-assistant
schickling-assistant marked this pull request as ready for review September 1, 2026 15:45
@schickling-assistant

Copy link
Copy Markdown
Contributor Author

@codex please review this PR.

Posted on behalf of @schickling
field value
agent_identity dev3.direct.omp.2cshu64q
session dev3.2cshu64q
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.0.9
agent_runtime OMP 18.0.9
tooling_profile dotfiles@b607597

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T20:30:31.608620Z 74edcf0 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3c778bbca7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread INVARIANTS.md Outdated
agent-identity: dev3.direct.omp.2cshu64q
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.0.9
agent-runtime: OMP 18.0.9
tooling-profile: dotfiles@b607597
agent-identity: dev3.direct.omp.2cshu64q
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.0.9
agent-runtime: OMP 18.0.9
tooling-profile: dotfiles@b607597
@schickling-assistant
schickling-assistant force-pushed the schickling-assistant/2026-09-01-wasip2-resource-foundation-2 branch from 3c778bb to 74edcf0 Compare September 1, 2026 20:17
@schickling-assistant

Copy link
Copy Markdown
Contributor Author

@codex review

Posted on behalf of @schickling
field value
agent_identity dev3.direct.omp.2cshu64q
session dev3.2cshu64q
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.0.9
agent_runtime OMP 18.0.9
tooling_profile dotfiles@b607597

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 74edcf035a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/resource_profile.rs
Comment on lines 1263 to 1265
prepared
.commit()
.map_err(PublicationTransactionError::Publication)?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Make carrier and catch-up state atomically visible

If the process exits at the provided after-carrier-before-state checkpoint, the carrier rename is already durable while CatchUpState still describes the prior revision and intent. Direct carrier readers—and callers using CatchUp::open without reconciliation—can therefore observe a mixed successor/prior state indefinitely until a later reconciliation, contradicting the new atomic-publication guarantee and potentially exposing new resource data before its invalidation is durable. Publish both pieces behind one atomic indirection, or require every reader to participate in the same lock/reconciliation protocol.

Useful? React with 👍 / 👎.

@schickling-assistant
schickling-assistant merged commit 5480498 into main Sep 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant